<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<style>
			.box {
				font-size: 20px;
			}
		</style>
	</head>
	<body>
		<div class="box" style="background-color: aqua; color: white">我是box</div>

		<script>
			var boxEl = document.querySelector('.box') // as HTMLDivElement

			// 1. 如果将一个属性的值, 设置为空的字符串, 那么是使用默认值
			/* boxEl.style.display = ''
			boxEl.style.fontSize = '' */

			// 2. 设置多个样式
			// boxEl.style.cssText = 'font-size: 22px; color: red'

			console.log(boxEl.style.backgroundColor)
			console.log(boxEl.style.fontSize)

			console.log(getComputedStyle(boxEl).fontSize)
		</script>
	</body>
</html>
